/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package foalvleditor.core;

import foalvleditor.core.impl.LevelModel;
import foalvleditor.gameobjects.AbstractGameObject;
import foalvleditor.gui.JImagePopupMenu;

/**
 *
 * @author Mikael
 */
public class ImageSwitcher {

    private static ImageSwitcher instance=new ImageSwitcher();

    public static ImageSwitcher getInstance(){
        return instance;
    }

  public void initSwitchImageDialog(AbstractGameObject goa, int x, int y) {
        JImagePopupMenu jipm=new JImagePopupMenu(goa);
        jipm.setVisible(true);
        jipm.show(LevelModel.getInstance().getView().getFrame(), x, y);
        }

   public void initSwitchImageDialog(AbstractGameObject goa) {
        initSwitchImageDialog(goa, LevelModel.getInstance().getView().getFrame().getMousePosition().x,
                LevelModel.getInstance().getView().getFrame().getMousePosition().y);
        }
}
